package com.jeomo.common.core.result;

/**
 * 返回码
 * @Author: qbt
 * @Date: 2019/4/10 22:41
 * @Version 1.0
 */
public enum ResultCode {

    SUCCESS(20000,"成功"),
    UNKNOWNACCOUNT(401, "无效的用户"),
    SESSION_TIMEOUT(300002, "会话超时"),
    UNAUTHORIZED(403, "权限认证失败"),
    PARAM_IS_INVALID(400001, "参数无效"),
    SYSTEM_INNER_ERROR(500001, "系统错误" ),
    MAY_DELETED(500002, "数据可能已被删除" ),
    MAY_MODIFIED(500003, "数据已被修改" ),
    DELETE_ERROR(500004,"删除失败，其他业务关联此数据"),
    INTEGRITY_CONSTRAINT_ERROR(500004,"数据重复了！"),
    ;



    Integer code;
    String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer code() {
        return this.code;
    }
    public String msg() {
        return this.msg;
    }
}
